// 路由地址配置
import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'

export default createRouter({
    history: createWebHashHistory(),  // 采用 hash 模式
    routes: [
        {
            // 根目录
            path: '/',
            name: 'Main',
            component: () => import('../views/Main.vue'),
        },
        {
            path: '/Hesuan',
            name: 'Hesuan',
            component: () => import('../views/Hesuan/index.vue'),
        },
        {
            path: '/Fangyi',
            name: 'Fangyi',
            component: () => import('../views/Fangyi/index.vue'),
            children: [
                {
                    path: 'Xiaoduji',
                    name: 'Xiaoduji',
                    component: () => import('../views/Fangyi/Xiaoduji/index.vue'),
                },
                {
                    path: 'Kouzhao',
                    name: 'Kouzhao',
                    component: () => import('../views/Fangyi/Kouzhao/index.vue'),
                },
                {
                    path: 'Xishouye',
                    name: 'Xishouye',
                    component: () => import('../views/Fangyi/Xishouye/index.vue'),
                },
                {
                    path: 'Wenduji',
                    name: 'Wenduji',
                    component: () => import('../views/Fangyi/Wenduji/index.vue'),
                },
            ]
        },
        {
            path: '/Chuxing',
            name: 'Chuxing',
            component: () => import('../views/Chuxing/index.vue'),
        },
        {
            path: '/AllAreaRisk',
            name: 'AllAreaRisk',
            component: () => import('../views/AllAreaRisk/index.vue'),
        },
    ]
})
